package com.wjj.sixinone.controller.admin;

import com.wjj.sixinone.common.enums.ApiTypeConst;
import com.wjj.sixinone.common.pojo.vo.LogVO;
import com.wjj.sixinone.common.util.Result;
import com.wjj.sixinone.service.LogService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(ApiTypeConst.API_ADMIN+"/log")
public class LogController {
    @Autowired
    private LogService logService;
    @GetMapping("/exceptionLog")
    public Result exceptionLog(LogVO logVO){
        return  logService.findExceptionLogPaginated(logVO) ;
    }
    @GetMapping("/uploadExcel")
    public void uploadExcel(HttpServletResponse response)
    {
        logService.uploadExcel(response);
    }
    @GetMapping("/tpserverLog")
    public Result selectLogByLimit(LogVO logVO)
    {
        return logService.tpserverLog(logVO);
    }
    @GetMapping("/uploadTPserverExcel")
    public void uploadTPserverExcel(HttpServletResponse response){
        logService.uploadTPserverExcel(response);
    }

}
